#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
//int main()
//{
//	int a = -3;
//	unsigned int  b = 2;
//	long c = a + b;
//	printf("%ld\n", c);
//}



void Swap(int* a, int* b)
{
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main()
{
	int a[5] = { 1,3,2,5,4};
	for (int i = 0; i < 5; i++)
	{
		int val = a[i];
		if (val >= 1 && val <= 5 && val!= a[val-1])
		{
			Swap(&a[val - 1], &a[i]);
		}
	}
	for (int i = 0; i < 5; i++)
	{
		if (a[i] != i + 1)
		{
			printf("%d\n", i + 1);
			return (i+1);
		}
	}
	printf("%d", 6);
	return 6;
}